import request from '@/utils/request'

export function getAppointAddress() {
  return request({
    url: '/inoculationSite/findAllSite',
    method: 'get',
  })
}

export function getVaccines() {
  return request({
    url: '/vaccinesInfo/findAllVaccinesInfo',
    method: 'get',
  })
}

export function addAppoint(data) {
  return request({
    url: '/appointment/addOneAppointment',
    method: 'post',
    data,
  })
}

export function findAppointment(data) {
  return request({
    url: '/appointment/findOneAppointment?userName=' + data,
    method: 'get',
  })
}

export function modifyAppointment(data) {
  return request({
    url: '/appointment/modifyAppointment',
    method: 'post',
    data,
  })
}

export function cancelAppointment(data) {
  return request({
    url: '/appointment/cancelAppointment?userName=' + data,
    method: 'get',
  })
}

export function findAllAppointment() {
  return request({
    url: '/appointment/findAllAppointment',
    method: 'get',
  })
}

export function queryPageAppointment(data) {
  return request({
    url: '/appointment/queryPageAppoint',
    method: 'post',
    data,
  })
}
